package hhm.utils.client;

import java.util.ArrayList;
import java.util.List;

import hhm.utils.ListUtils;
import hhm.utils.pojo.Data;
import hhm.utils.pojo.Student;

public class TestListUtils {

	public static void main(String[] args) {
		// 装载数据
		List<Data> list = new ArrayList<Data>();

		for (int i = 1; i <= 3; i++) {
			Data data = new Data();
			Student student = new Student(i, "zxc" + i, "陕西" + i);
			data.setStudent(student);
			list.add(data);
		}

		// 取出List<Student>

		List<Student> stdList = new ArrayList<>();
		stdList = ListUtils.getFiledList(list, Student.class);

		int index = ListUtils.findValue(stdList, "address", "陕西2");
		System.out.println(index);
	}

}
